import com.jiuan.transfer.mqtt.domain.Config;
import com.jiuan.transfer.rabbitmq.ChannelFactory;


public class StarIt {


    public static void main(String[] args) {

        //初始化配置文件
        Config.initConfig(null);

        //创建线程
        try {
            initThreadPool("all.mqtt_publish", Config.getRabbit_connection_number());
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);

        }


    }



    private static void initThreadPool(String queue,int size) throws Exception {
        //new ThreadPoolExecutor(queues.length, queues.length, 1, TimeUnit.DAYS,new  )
        for (int i = 0; i < size; i++) {
            new WorkThread(queue, ChannelFactory.getChannel()).start();
        }
    }



}
